<?php

namespace pam\Service;

/**
 * Description of ResearchService
 *
 * @author Robert Bwana
 */

use pam\Model\Research;
use pam\Mapper\ResearchDataAccess as rda;

class ResearchService {
    protected $rda;
    
    public function __construct(rda $dataAccess) {
        $this->rda = $dataAccess;
    }
    
    public function deleteResearch(Research $research) {
        return $this->rda->delete($research->getId());
    }

    public function findAll() {
        return $this->rda->findAll();
    }

    public function findResearch($id) {
        return $this->rda->find($id);
    }

    public function saveResearch(Research $research) {
        return $this->rda->save($research);
    }
}
